import { useStorage } from "./useStorage";

export function useDeviceUuid(): string {
    const deviceUuid = useStorage().get('deviceUuid', undefined);
    if (deviceUuid) return deviceUuid
    const newDeviceId = Math.random().toString(36).substr(2, 9);
    useStorage().put('deviceUuid', newDeviceId);
    return newDeviceId
}
